﻿using Microsoft.AspNetCore.SignalR.Client;

namespace FlyingEye.ApplicationContracts.SignalRHubs
{
    public enum RetryReason
    {
        None,
        CantRegisterNode
    }

    public class ConnectionCallbackEventArgs : EventArgs
    {
        public string Message { get; set; } = string.Empty;

        public HubConnectionState ConnectionState { get; set; } = HubConnectionState.Disconnected;

        public RetryReason RetryReason { get; set; }

        public ConnectionCallbackEventArgs(string message, HubConnectionState hubConnectionState, RetryReason retryReason = RetryReason.None)
        {
            ConnectionState = hubConnectionState;
            Message = message;
            RetryReason = retryReason;
        }
    }
}
